#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>

using namespace std;

typedef long long ll;

bool Test(ll& a, ll& b, ll& c)
{
    if (a + b > c && a + c > b && b + c > a)
    {
        return true;
    }

    return false;
}

int main()
{
    int n; cin >> n;
    while (n--)
    {
        vector<ll> arr(6, 0);
        for (int i = 0; i < 6; i++)
        {
            cin >> arr[i];
        }
        sort(arr.begin(), arr.end());
        bool x = false;
        do {
            if (Test(arr[0], arr[1], arr[2]) &&
                Test(arr[3], arr[4], arr[5]))
            {
                x = true;
            }
        } while (next_permutation(arr.begin(), arr.end()));
        if (x) cout << "Yes" << endl;
        else { cout << "No" << endl; }
    }


    return 0;
}